home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Apple Location Manager / Sources / Sample.r < prev    next >
Encoding:
Text File  |  1997-02-18  |  4.8 KB  |  199 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Sample.r
  3.  
  4.      Contains:    Location Manager SDK Sample Rez data...
  5.  
  6.      Version:    ALM SDK 1.0
  7.                  Package:    Location Manager SDK 1.0
  8.  
  9.      Copyright:    © 1984-1997 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@apple.com
  16.  
  17. */
  18.  
  19. #define        UseExtendedThingResource        1
  20.  
  21. #ifndef        __SAMPLE__
  22. #include    "Sample.h"
  23. #endif        // __SAMPLE__
  24.  
  25. #ifndef     __LOCATIONMANAGER_R__
  26. #include    "LocationManager.r"
  27. #endif        // __LOCATIONMANAGER_R__
  28.  
  29. #ifndef        __TYPES_R__
  30. #include    "Types.r"
  31. #endif        // __TYPES_R__
  32.  
  33. include        "Sample.rsrc";
  34.  
  35. // --------------------------------------------------------------------------------------
  36.  
  37. // Information for the component manager -- be sure to change the subtype!
  38.  
  39. resource 'thng' (128, "Generic Module") {
  40.     kALMComponentType,
  41.     'MSWD',        // Component Subtype--must be unique!
  42.     '????',        // Component Manufacturer
  43.     0x0,        // Flags (32 bits)
  44.     kAnyComponentFlagsMask,
  45.     kExecutableRsrcType, kExecutableRsrcID,
  46.     kNameRsrcType, kNameRsrcID,
  47.     kDescRsrcType, kDescRsrcID,
  48.     kIconRsrcType, kIconRsrcID,
  49.     0x0,    // Version
  50.     componentDoAutoVersion,
  51.     kIconRsrcID,
  52.     {}        // No platform info
  53. };
  54.  
  55. resource kNameRsrcType (kNameRsrcID, "Module Name") {
  56.     "Generic Module"
  57. };
  58.  
  59. resource kDescRsrcType (kDescRsrcID, "Module Description") {
  60.     "This is the Generic Sample module for Location Manager SDK."
  61. };
  62.  
  63. // Internationalization in an easy place for internationalizers to get at it...
  64.  
  65. resource kINTLrsrcType (kINTLrsrcID, "Script Info") {
  66.     kALMScriptInfoVersion,
  67.     smRoman,        // Script
  68.     verUS,            // Version
  69.     langEnglish,    // Language
  70.     10,                // Size
  71.     "Geneva"        // Font
  72. };
  73.  
  74. // So that the Generic module can be customized, a list of applications, and
  75. // pairs of preference file resources...
  76.  
  77. resource kAppsRsrcType (kAppsRsrcID, "Apps to Quit") {{
  78.     "MSWD", quitOnGetOrSet
  79. }};
  80.  
  81. resource kFilesRsrcType (kFilesRsrcStartID, "Word Settings (5)") {
  82.     "Word Settings (5)"
  83. };
  84.  
  85. resource kRestartRsrcType (kRestartRsrcStartID, "Word Settings (5)") {
  86.     kNoRestart
  87. };
  88.  
  89. // --------------------------------------------------------------------------------------
  90.  
  91. // Error messages; keep positions in sync with the error numbers...
  92.  
  93. resource 'STR#' (kSampleErrStrRsrcID, "Errors") {{
  94.     "Could not import because preferences on this machine match dates on imported set, "
  95.         "so there would be no way to tell them apart.",
  96.     "Could not quit an application using module’s preferences.",
  97.     
  98.     ""
  99. }};
  100.  
  101. resource 'STR#' (kSampleMiscStrRsrcID, "Misc Messages") {{
  102.     "Preference files containing ^0 modified at ^1 on ^2.",
  103.     
  104.     ""
  105. }};
  106.  
  107. // --------------------------------------------------------------------------------------
  108.  
  109. // Handy template resources so that we can use ResEdit/Resourcerer...
  110.  
  111. resource 'TMPL' (10000, kINTLrsrcTypeString, purgeable) {{
  112.  
  113.     "Header Version",             "DWRD",
  114.     "Script Code",                 "DWRD",
  115.     "Region Code",                 "DWRD",
  116.     "Language Code",             "DWRD",
  117.     "Default Font Size",         "DWRD",
  118.     "Default Font Name",         "PSTR"
  119.  
  120. }};
  121.  
  122. resource 'TMPL' (10001, "thng", purgeable) {{
  123.  
  124.     "Component Type",             "TNAM",
  125.     "Component Subtype",         "TNAM",
  126.     "Component Manufacturer",    "TNAM",
  127.     "Register Component",        "BBIT",
  128.     "Fast Dispatch Calls",        "BBIT",
  129.     "Reserved",                 "BBIT",
  130.     "Reserved",                 "BBIT",
  131.     "Reserved",                 "BBIT",
  132.     "Reserved",                 "BBIT",
  133.     "Reserved",                 "BBIT",
  134.     "Reserved",                 "BBIT",
  135.     "Type Flags",                "HBYT",
  136.     "Subtype Flags",            "HBYT",
  137.     "Manufacturer Flags",        "HBYT",
  138.     "Flag Mask",                 "HLNG",
  139.     "Code Resource Type",         "TNAM",
  140.     "Code Resource ID",         "DWRD",
  141.     "Name Resource Type",         "TNAM",
  142.     "Name Resource ID",         "DWRD",
  143.     "Info Resource Type",         "TNAM",
  144.     "Info Resource ID",         "DWRD",
  145.     "Icon Resource Type",        "TNAM",
  146.     "Icon Resource ID",         "DWRD",
  147.     "Component Version",         "HLNG",
  148.     "Registration Flags",        "HLNG",
  149.     "Icon Family",                "DWRD",
  150.     "Reserved",                    "DWRD",
  151.     "Platform Count",            "OCNT",
  152.     "*****",                    "LSTC",
  153.     "Component Flags",            "HLNG",
  154.     "Code Type",                "HLNG",
  155.     "Code ID",                    "DWRD",
  156.     "Platform ID",                "DWRD",
  157.     "*****",                    "LSTE"
  158.  
  159. }};
  160.  
  161. resource 'TMPL' (10002, kAppsRsrcTypeString, purgeable) {{
  162.  
  163.     "Application Signatures",    "OCNT",
  164.     "*****",                    "LSTC",
  165.     "App Sig",                    "TNAM",
  166.     "OnSet",                    "BBIT",
  167.     "OnGet",                    "BBIT",
  168.     "Reserved",                    "BBIT",
  169.     "Reserved",                    "BBIT",
  170.     "Reserved",                    "BBIT",
  171.     "Reserved",                    "BBIT",
  172.     "Reserved",                    "BBIT",
  173.     "Reserved",                    "BBIT",
  174.     "Align",                    "AWRD",
  175.     "*****",                    "LSTE"
  176.  
  177. }};
  178.  
  179. resource 'TMPL' (10003, kFilesRsrcTypeString, purgeable) {{
  180.  
  181.     "File Name",                "PSTR",
  182.  
  183. }};
  184.  
  185. resource 'TMPL' (10004, kRestartRsrcTypeString, purgeable) {{
  186.  
  187.     "Restart",                    "BBIT",
  188.     "Reserved",                    "BBIT",
  189.     "Reserved",                    "BBIT",
  190.     "Reserved",                    "BBIT",
  191.     "Reserved",                    "BBIT",
  192.     "Reserved",                    "BBIT",
  193.     "Reserved",                    "BBIT",
  194.     "Reserved",                    "BBIT",
  195.     "Align",                    "AWRD",
  196.  
  197. }};
  198.  
  199.